export const SYSTEM_INFO = uni.getSystemInfoSync();
console.log(SYSTEM_INFO, "system");
// export const SYSTEM_INFO = wx.getSystemInfoSync();
export const getStatusBarHeight = (): number =>
  SYSTEM_INFO.statusBarHeight || 0;
export const getTitleBarHeight = (): number => {
  if (uni.getMenuButtonBoundingClientRect) {
    const { top, height } = uni.getMenuButtonBoundingClientRect();
    return height + (top - getStatusBarHeight() * 1.6);
  } else {
    return 0;
  }
};

export const getNavBarHeight = (): number =>
  getStatusBarHeight() + getTitleBarHeight();
